/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.data.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author thiago
 */
@Embeddable
public class ListaprecosPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "codigoforn")
    private int codigoforn;
    @Basic(optional = false)
    @Column(name = "codigolist")
    private int codigolist;
    @Basic(optional = false)
    @Column(name = "codigocli")
    private int codigocli;
    @Basic(optional = false)
    @Column(name = "codigoprod")
    private int codigoprod;

    public ListaprecosPK() {
    }

    public ListaprecosPK(int codigoforn, int codigolist, int codigocli, int codigoprod) {
        this.codigoforn = codigoforn;
        this.codigolist = codigolist;
        this.codigocli = codigocli;
        this.codigoprod = codigoprod;
    }

    public int getCodigoforn() {
        return codigoforn;
    }

    public void setCodigoforn(int codigoforn) {
        this.codigoforn = codigoforn;
    }

    public int getCodigolist() {
        return codigolist;
    }

    public void setCodigolist(int codigolist) {
        this.codigolist = codigolist;
    }

    public int getCodigocli() {
        return codigocli;
    }

    public void setCodigocli(int codigocli) {
        this.codigocli = codigocli;
    }

    public int getCodigoprod() {
        return codigoprod;
    }

    public void setCodigoprod(int codigoprod) {
        this.codigoprod = codigoprod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) codigoforn;
        hash += (int) codigolist;
        hash += (int) codigocli;
        hash += (int) codigoprod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ListaprecosPK)) {
            return false;
        }
        ListaprecosPK other = (ListaprecosPK) object;
        if (this.codigoforn != other.codigoforn) {
            return false;
        }
        if (this.codigolist != other.codigolist) {
            return false;
        }
        if (this.codigocli != other.codigocli) {
            return false;
        }
        if (this.codigoprod != other.codigoprod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.data.model.ListaprecosPK[ codigoforn=" + codigoforn + ", codigolist=" + codigolist + ", codigocli=" + codigocli + ", codigoprod=" + codigoprod + " ]";
    }
    
}
